<template>
  <el-dialog v-model="visible" title="分享本站">
    <div class="w-full flex flex-center">
      <vueQr :text="sharePath" :size="200" :correctLevel="3"></vueQr>
    </div>
  </el-dialog>
</template>

<script setup>
import { ref } from 'vue'
import vueQr from 'vue-qr/src/packages/vue-qr.vue'

const visible = ref(false)
const baseUrl = 'https://m.rcep.cn'
const sharePath = ref(baseUrl)

const init = (path) => {
  visible.value = true
  sharePath.value = baseUrl + path
  console.log(baseUrl + path)
}

defineExpose({
  init,
})
</script>
